/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.templates;

/**
 *
 * @author Administrator
 */
public class filling2State extends CannonState {

    private final boolean compresserOn = true;
    private final boolean fillValveOn = true;
    private final boolean DumpValveOn = false;
    private final boolean FireValve1On = false;
    private final boolean FireValve2On = false;
    private final boolean LightOn = true;

    public void updateState() {
        if (super.MyController.CannonTimer.get() > 500) {
            super.MyController.currentState = super.MyController.filled2;
            super.MyController.CannonTimer.reset();

        }
        if (super.MyController.safetyButton()) {
            super.MyController.currentState = super.MyController.safety;
            super.MyController.CannonTimer.reset();
        }


    }

    public void UpdatePneumatics() {
        super.PneumaticSystem.compressorOn = compresserOn;
        super.PneumaticSystem.fillValveOn = fillValveOn;
        super.PneumaticSystem.dumpValveOn = DumpValveOn;
        super.PneumaticSystem.fireValve1On = FireValve1On;
        super.PneumaticSystem.fireValve2On = FireValve2On;
        super.PneumaticSystem.lightOff = !LightOn;
    }
    public String ToString() {
        return "filling2";
    }
}
